﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Gollie.Controls
{
	public partial class AuthenticationRequiredBaseUserControl : BaseUserControl
	{
		protected bool AsAdvertiser = false;

		protected override void PreLoadHandler(object sender, EventArgs e)
		{
			if (!(this.CheckPrivileges()))
				Response.Redirect("/Expired.aspx", true);
		}

		protected virtual bool CheckPrivileges()
		{
			return this.CheckLoggedIn();
		}

		private bool CheckLoggedIn()
		{
			return (this.UserInfo != null);
		}
	}
}